<template>
  <div class="askingfor-pop">
    <el-dialog
      :visible="askingforShow"
      @close="colsePop"
      @open='openAsking'
      width="20%"
      title='索要资源'
    >
      <div class='askingfor-cont'>
        <div class="askingfor-input">
          <el-input v-model='message'  placeholder="请输入手机号码"></el-input>
        </div>
        <div  class="askingfor-btn">
          <el-button type="primary"  :loading="askingloading" @click="submitAsking">索要</el-button>
        </el-col>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "Askingfor",
  components: {
    
  },
  props:{
    askingforShow:false,
    askingloading:false,
    isLoadingSuccess:Boolean
  },
  data() {
    return {
      message: '',
    };
  },
  methods: {
    colsePop() {
      this.message=''
      this.$emit("colsePop",this.message);
    },
    openAsking(val){
      this.$emit("openAsking",this.askingforShow);
    },
    submitAsking(){
      this.$emit('submitAsking',this.message)
      if(this.isLoadingSuccess){
        this.message=''
      }
    }
  },
  watch:{},
  mounted() {
    
  }
};
</script>
<style lang='scss' scoped>
.askingfor-cont{
  width: 100%;
  margin: 0 auto;
  display: flex;
  margin-bottom: 20px;
  flex-direction: row;
  .askingfor-input{
    width: 90%;
  }
}
</style>



